package ai.plantdata.mvc.controller;

import ai.plantdata.mvc.model.Student;
import ai.plantdata.mvc.view.StudentView;

/**
 * @Author: WangHui
 * @Date: 2020/12/24 15:28
 * @Description:
 */
public class StudentController {
    private Student model;
    private StudentView view;

    public StudentController(Student model, StudentView view) {
        this.model = model;
        this.view = view;
    }

    public Student getModel() {
        return model;
    }

    public void setModel(Student model) {
        this.model = model;
    }

    public StudentView getView() {
        return view;
    }

    public void setView(StudentView view) {
        this.view = view;
    }
    public void updateView(){
        view.printStudentDetails(model.getName(),model.getRollNo());
    }
}
